feat(01KVVJNM): a green story whose verdict step errors is surfaced as a re-runnable setup problem, never a false block#444
Merged
jackmcintyre merged 1 commit intoJun 24, 2026
Conversation
…re-runnable setup problem, not a false block When the run's verdict step itself errors or returns an unreadable/unrecognised result (e.g. processReviewerTranscript throws ReviewerResultFileMalformedError on an unknown recommendedVerdict token or a non-JSON reviewer-result file -> MCP isError with no `next`, or the courier relay garbles -> seam _parseError), the old catch-all dumped the GREEN, finished story into the blocked pile as 'verdict-failed' for the operator to rescue by hand. Split the verdict catch-all in run.workflow.js: - done-blocked-reviewer-blocked -> reviewer-verdict-blocked (unchanged quality block) - everything else (no recognised verdict) -> verdict-could-not-run, a distinct, re-runnable SETUP problem whose reason names the VERDICT step so it reads distinctly from review-could-not-run (a review that could not RUN). Registered verdict-could-not-run in the closed blocked_by enum (execution-manifest.ts) so blockStory's manifest write does not throw and the reason is first-class, not silently swallowed. Rebuilt + committed dist. Tests: extended run-fault-injection to pin BOTH directions (unreadable verdict -> verdict-could-not-run, never verdict-failed; genuine reviewer block -> reviewer-verdict-blocked). Updated run-concurrent-dispatch's reviewer-block fixture to inject the real done-blocked-reviewer-blocked verdict (was a stand-in token now correctly reclassified). Claude-Session: https://claude.ai/code/session_01EE2ncqkqh3u5af93Uf3bDA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes (plain language)
When the run finishes a story whose PR is green and ACs are met, the last step asks for a final verdict. If that verdict step itself errors or hands back a result the run can't read, the old code lumped the story into the blocked pile as a generic
verdict-failed— making an operator hand-rescue a story that was actually done and passing. This was a false failure.This splits that catch-all so:
verdict-could-not-run), which names the verdict step so an operator can tell it apart from a review that could not run (review-could-not-run).One concrete trigger:
processReviewerTranscriptthrowsReviewerResultFileMalformedErrorwhen the reviewer-result file carries an unrecognised verdict token or isn't JSON; that surfaces as an MCP error with nonext, so the run can't read a verdict — now classified as the setup problem instead of a false block.The new reason is registered in the closed
blocked_byenum so the manifest write doesn't throw and the reason is first-class (not silently swallowed). dist bundles rebuilt + committed.Acceptance criteria
verdict-could-not-run), never dumped as averdict-failedthe operator must rescue by hand.reviewer-verdict-blocked), exactly as today; the new setup-problem handling applies ONLY when no real verdict could be produced.verdict-could-not-run) names the verdict step distinctly from a review that could not run (review-could-not-run), so the operator can tell which part of the flow needs attention.How it was tested
run-fault-injection.test.tsto pin BOTH directions against the realrun.workflow.jsbody: an injected unreadable verdict on a green story routes toverdict-could-not-run(asserted NOTverdict-failed, NOTreview-could-not-run); a genuinedone-blocked-reviewer-blockedstill lands inreviewer-verdict-blocked.run-concurrent-dispatch.test.ts's reviewer-block fixture to inject the realdone-blocked-reviewer-blockedverdict (it previously used a stand-in token that is now correctly reclassified as a verdict-step setup error).pnpm -r buildgreen;pnpm test:coveragegreen — 3828 tests pass, coverage lines 86.26% (≥86 CI gate).https://claude.ai/code/session_01EE2ncqkqh3u5af93Uf3bDA